Skip to content

Conversation

wtripp180901
Copy link
Contributor

@wtripp180901 wtripp180901 commented Sep 17, 2024

When running a Packer build which is based on a "fat image", ansible-init runs during boot of the Packer build VM. This is undesirable as:

  • In the general case it may take actions which are not appropriate during a build
  • When ansible-init completes it writes its sentinel file into the resulting image, which means booting a cluster instance using the resulting image never runs ansible-init

This PR disables ansible-init during packer builds via a metadata flag.

@wtripp180901 wtripp180901 requested a review from sjpb September 17, 2024 09:26
@wtripp180901 wtripp180901 requested a review from a team as a code owner September 17, 2024 09:26
@sjpb
Copy link
Collaborator

sjpb commented Oct 10, 2024

@wtripp180901 can you update from main please?

@bertiethorpe bertiethorpe force-pushed the fix/packer-sentinel-file branch 2 times, most recently from 8cc4b7c to 6264ed3 Compare October 15, 2024 10:56
@bertiethorpe
Copy link
Member

bertiethorpe commented Oct 22, 2024

Latest image tested by:

  • New fat image built
  • 'extra' build on top of it
  • mount that image to make sure ansible-init hasn't run during the second fatimage build
  • then launch the image in a VM to make sure the sentinel file is written

New image passing these tests.
https://github.com/stackhpc/ansible-slurm-appliance/actions/runs/11451000682

@bertiethorpe bertiethorpe self-assigned this Oct 22, 2024
Copy link
Collaborator

@sjpb sjpb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bertiethorpe there is no updated reference to ansible-init including azimuth-cloud/ansible-collection-image-utils#1

@bertiethorpe bertiethorpe requested a review from sjpb October 23, 2024 08:14
@sjpb sjpb changed the title Fixed ansible-init sentinel being created during packer build Prevent ansible-init running during packer build Oct 23, 2024
Copy link
Collaborator

@sjpb sjpb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bertiethorpe bertiethorpe merged commit 9e30bf6 into main Oct 23, 2024
6 checks passed
@bertiethorpe bertiethorpe deleted the fix/packer-sentinel-file branch October 23, 2024 10:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants